package com.okami.designpatterns.factory.simplefactory;

import com.okami.designpatterns.factory.NoProductException;
import com.okami.designpatterns.factory.Shape;

/**
 * @description: 测试简单工厂模式
 * @author: TanJingyu
 * @create: 2020-12-09 10:47
 **/
class Test {
    public static void main(String[] args) throws NoProductException {
        ShapeStore produce = new ShapeStore();

        Shape circular = produce.getShape("circular");
        circular.description();

        Shape square = produce.getShape("square");
        square.description();

        Shape hah = produce.getShape("hah");
        hah.description();
    }
}
